import request from '@/utils/request'

export const LinkApi = {

    /**
     *  分页
     * @returns
     */
    getPage: (data) => {
        return request({
            url: '/manage/cms/link/getPage',
            data,
            method: 'post'
        })
    },

    /**
     *  删除
     * @returns
     */
    delete: (id) => {
        return request({
            url: '/manage/cms/link/delete',
            params: {id},
            method: 'get'
        })
    },

    /**
     *  更新
     * @returns
     */
    edit: (data) => {
        return request({
            url: '/manage/cms/link/edit',
            data,
            method: 'post'
        })
    },

    /**
     *  插入
     * @returns
     */
    add: (data) => {
        return request({
            url: '/manage/cms/link/add',
            data,
            method: 'post'
        })
    },

    /**
     *  查询详细
     * @returns
     */
    getDetailById: (id) => {
        return request({
            url: '/manage/cms/link/getDetailById',
            params: {id},
            method: 'get'
        })
    },

    /**
     *  修改排序
     * @returns
     */
    updateSort: (data) => {
        return request({
            url: '/manage/cms/link/updateSort',
            data,
            method: 'post'
        })
    },

    /**
     *  修改状态
     * @returns
     */
    updateStatus: (data) => {
        return request({
            url: '/manage/cms/link/updateStatus',
            data,
            method: 'post'
        })
    }

}
